/* 
 * Distributed as part of jdiff
 * 
 * Copyright (C) 2008 QArks.com
 *
 * Author: Pierre Meyer <support@qarks.com>
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 2.1, as 
 * published by the Free Software Foundation.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
 * NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
 * USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * The above copyright notice and this permission notice shall be included
 * in all copies or substantial portions of the Software.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this software; see the file LICENSE.  If not, write to the
 * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 */
package diff.ini;

import java.awt.GridLayout;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.border.EmptyBorder;

import diff.tela.DiffPanel;

public class DiffMergePanel extends JPanel {  

	private DiffPanel diffEditor;
	private JTabbedPane tabbedPane;

	public DiffMergePanel() {
		tabbedPane = new JTabbedPane();		
		
		diffEditor = new DiffPanel();


		diffEditor.setBorder(new EmptyBorder(10,10,10,10));

		tabbedPane.add(diffEditor, "");

		setLayout(new GridLayout(1,1));
		add(tabbedPane);
		
	}
	
	public void doDiff(String ObjSel, String leftLabel, String rightLabel, String leftString, String rightString){
		tabbedPane.setSelectedIndex(0);
		tabbedPane.setTitleAt(0, ObjSel);
		diffEditor.setLeftString(leftLabel, leftString);
		diffEditor.setRightString(rightLabel, rightString);
		diffEditor.onObjDropped();
	}
}
